首页
首页

Docker System error:exit status 1 解决方法

Docker System error: exit status 1 解决方法

###起因

今天给公司生产kubernetes集群添加节点。在节点添加完成后发现出现以下问题再新节点启动pod时Event中出现 Error syncing pod, skipping: failed to "StartContainer" for "POD" with ...... :System error: exit status 1 错误。

###排查

  • 查看event

    只有以上错误信息

  • google查询错误得到以下结果

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
        selinux 未关闭
    ```
    这个结果明显不能解决我的问题,因为我很确定 我的selinux是关闭状态。

    - 继续google“”System error: exit status 1“”

    找到改URL[http://stackoverflow.com/questions/40483336/cannot-start-container-process-is-killed][1]

    最后按照步骤,解决该问题。

    -分析原理

    由于安装的是老版本的docker,所以在启动配置文件的option中添加“--exec-opt native.cgroupdriver=systemd”参数。
    问题解决。

    最后提醒 这个参数可以添加到sysconfig/docker配置文件中,也可以添加到服务启动文件中。

    最最后:

    安装老版本的方法:
    ```js
    yum provides docker
    yum install docker-1.13.1-25.el7.centos.x86_64

以上

支持一下
扫一扫,我会更有动力更新
  • 微信扫一扫
  • 支付宝扫一扫